package com.newly.common.core.utils;

import org.springframework.context.ApplicationContext;

public class SpringContextUtil {
    public static ApplicationContext applicationContext;

    public static <T> T getBean(Class<T> clazz) {
        return applicationContext != null ? applicationContext.getBean(clazz) : null;
    }
}
